package com.jiazhong.basic.shuxin.design.观察者模式;

public class App {

    public static void main(String[] args) {
        Observer o1 = new LotteryBuyerObserver("张三");
        Observer o2 = new LotteryBuyerObserver("李四");
        Observer o3 = new LotteryBuyerObserver("王五");
        Observer o4 = new LotteryBuyerObserver("马六");
        Observer o5 = new LotteryBuyerObserver("朝气");
        Subject subject = new LotteryTicketSubject();
        subject.registerObserver(o1);
        subject.registerObserver(o2);
        subject.registerObserver(o3);
        subject.registerObserver(o4);
        subject.registerObserver(o5);
        subject.notifyObservers();
    }
}
